From: Marco Trevisan (TreviƱo) Date: Fri, 8 Mar 2019 20:21:28 +0000 (-0600) Subject: boxpointer: Compute arrowStride using sourceActor monitor as reference X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~861^2^2~14 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4892a87dfeacbba504fc20e1837a46cc2773eb42;p=gnome-shell.git boxpointer: Compute arrowStride using sourceActor monitor as reference I suppose this was also the goal of commit 96e14dc, but because it was checking the value of the always-undefined this.sourceActor, it really never worked as expected. So, now since we assume that this._sourceActor is always defined just use it as reference to compute the monitor menu position. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1029 https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/435 --- diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js index 11b2bdda8..59c91f037 100644 --- a/js/ui/boxpointer.js +++ b/js/ui/boxpointer.js @@ -623,10 +623,7 @@ var BoxPointer = GObject.registerClass({ _calculateArrowSide(arrowSide) { let sourceAllocation = Shell.util_get_transformed_allocation(this._sourceActor); let [minWidth, minHeight, boxWidth, boxHeight] = this.get_preferred_size(); - let monitorActor = this.sourceActor; - if (!monitorActor) - monitorActor = this; - let monitorIndex = Main.layoutManager.findIndexForActor(monitorActor); + let monitorIndex = Main.layoutManager.findIndexForActor(this._sourceActor); let workarea = Main.layoutManager.getWorkAreaForMonitor(monitorIndex); switch (arrowSide) {